﻿@model NK.Mvc3.Models.StoreInputDetail
           
@*<tr id="storeinputdetail-@Model.ID">*@
    <td>
        @Html.DisplayFor(modelItem => Model.ProductInfo.BarCode)
    </td>
    <td>
        @Html.DisplayFor(modelItem => Model.ProductInfo.POSDescription)
    </td>
    <td>
        @Html.DisplayFor(modelItem => Model.Quantity)
    </td>
    <td>
        @Html.DisplayFor(modelItem => Model.ExpireDate)
    </td>
    <td>
        @Html.DisplayFor(modelItem => Model.FreeQuantity)
    </td>
    <td>
        @Html.DisplayFor(modelItem => Model.CostInput)
    </td>
    <td>
        @Html.DisplayFor(modelItem => Model.TotalCost)
    </td>
    <td>
        @*@Html.ActionLink("Edit", "Edit", new { id = Model.ID }, "StoreInputDetail") |*@
        @*<a href="#" onclick="loadedUpdate('@Model.ID','storeinputdetail-@Model.ID')">Edit</a>*@
        @Ajax.ActionLink("Edit","AjaxUpdate","StoreInputDetail", new {id = Model.ID}, new AjaxOptions
                                                                                        {
                                                                                            UpdateTargetId = "storeinputdetail-"+Model.ID,
                                                                                            HttpMethod = "GET",
                                                                                            InsertionMode = InsertionMode.Replace,
                                                                                            OnSuccess = "insertUpdate"
                                                                                        })
        @*@Html.ActionLink("Delete", "Delete", new { id = Model.ID }, "StoreInputDetail")*@
        @Ajax.ActionLink("Delete", "AjaxDelete", "StoreInputDetail", new { id = Model.ID }, new AjaxOptions
                                                                {
                                                                    UpdateTargetId = "storeinputdetail-" + Model.ID,
                                                                    HttpMethod = "GET",
                                                                    InsertionMode = InsertionMode.Replace,
                                                                    Confirm = "Confirm deleting: " + Model.ProductInfo.POSDescription
                                                                })
    </td>

    
@*</tr>*@
@*<script type="text/javascript">
    $(function () {
        //var html = $('#storeinputdetail-@Model.ID').contents(); //.children('tr');
        //$('#storeinputdetail-@Model.ID').replaceWith(html);
    });
</script>*@